import http from "@/utils/http";

/**
 * 小程序登录
 * 正常业务流程
 */
export const postLoginWxMin =(data)=>{
    return http({
        url:'/login/wxMin',
        method:'post',
        data
    })
}
/**
 * 小程序登录
 * 测试接口
 */
export const postTestLoginWxMin =(phoneNumber)=>{
    return http({
        url:'/login/wxMin/simple',
        method:'post',
        data:{phoneNumber}
    })
}

/**
 * 获取个人信息
 */
export const getMemberProfile =()=>{
    return http({
        url:'/member/profile',
    })
}

/**
 * 修改头像
 */
export const MemberProfileAvatar =(filePath)=>{
    return uni.uploadFile({
        url:'/member/profile/avatar',
        filePath,
        name:'file'
    })
}

/**
 * 个人信息-修改
 */
export const putMemberProfile =(data)=>{
    return http({
        url:'/member/profile',
        method:'put',
        data
    })
}